package mdm.led.service;

import java.util.List;
import java.util.Map;

import mdm.led.entity.three.CureIssueList;
import mdm.led.entity.three.ExternalSelfItems;
import mdm.led.entity.three.FindThreeTaskSelf;
import mdm.led.entity.three.InsertCureIssue;
import mdm.led.entity.three.ReceiIissueMan;
import mdm.led.entity.three.ThreeCureIssue;
import mdm.led.entity.three.ThreeMainList;
import mdm.led.entity.three.ThreeTable;
import mdm.led.entity.three.ThreeTaskAllot;
import mdm.led.entity.three.ThreeTaskExternal;
import mdm.led.entity.three.ThreeTaskSelf;
import mdm.led.entity.three.UpdateThreeTaskAllot;

/**
 *
 * @author :Monarch丿He
 * @date :2018年12月13日
 * @explain :三查表 业务 接口
 */
public interface ThreeTableService {

	/**
	 * 添加三查表
	 * 
	 * @param table
	 * @return
	 */
	Boolean addThreeTable(ThreeTable table) throws Exception;

	/**
	 * 修改三查表
	 * 
	 * @param table
	 * @return
	 */
	Integer updateThreeTable(ThreeTable table) throws Exception;

	/**
	 * 查询匹配信息三查表
	 * 
	 * @param table
	 * @return
	 */
	List<ThreeTable> findThreeTables(ThreeTable table) throws Exception;

	/**
	 * 根据id 查询三查表
	 * 
	 * @param id
	 * @return
	 */
	ThreeTable findThreeTableById(Integer id) throws Exception;

	/**
	 * 分配任务 修改任务状态为已分配
	 * 
	 * @param id
	 * @return
	 */
	Integer updateThreeTaskAllot(UpdateThreeTaskAllot taskAllot);

	/**
	 * 查询个人待分配任务
	 * 
	 * @param id
	 * @return
	 */
	List<ThreeTaskAllot> findThreeTaskAllot(Integer id);

	/**
	 * 查询三查主页面列表web
	 * 
	 * @param id
	 * @return
	 */
	List<ThreeMainList> findThreeMainList(Integer id, String name);

	/**
	 * 查询三查主页面列表App
	 * 
	 * @param id
	 * @return
	 */
	List<ThreeMainList> findThreeMainList(Integer userID, Integer tableType);

	/**
	 * 修改自查任务
	 * 
	 * @param taskSelf
	 * @return
	 */
	Boolean updateThreeTaskSelf(Map<String, Object> map);

	/**
	 * 根据条件查询自查列表
	 * 
	 * @param taskSelf
	 * @return
	 */
	List<ThreeTaskSelf> findThreeTaskSelf(FindThreeTaskSelf taskSelf);

	/**
	 * 根据自查任务ID查询自查详情
	 * 
	 * @param id
	 * @return
	 */
	Map<String, Object> findThreeTaskSelfByID(Integer id);

	/**
	 * 添加整改问题
	 * 
	 * @param issue
	 * @return
	 */
	Integer addThreeCureIssue(InsertCureIssue issue);

	/**
	 * 修改整改清单
	 * 
	 * @param issue
	 * @return
	 */
	Integer updateThreeCureIssue(ThreeCureIssue issue);

	/**
	 * 查询当前用户待整改列表
	 * 
	 * @param userID
	 * @return
	 */
	List<CureIssueList> findThreeCureIssueList(Integer userID);

	/**
	 * 根据问题ID 查询问题详情信息
	 * 
	 * @param id
	 * @return
	 */
	ThreeCureIssue findThreeCureIssueByID(Integer id);

	/**
	 * 添加外部任务
	 * 
	 * @param selfTaskID
	 * @return
	 */
	Integer addTaskExternal(Integer selfTaskID);

	/**
	 * 修改外部任务
	 * 
	 * @param taskID
	 * @return
	 */
	Boolean updateTaskExternal(ExternalSelfItems exteritems);

	/**
	 * 查询外部任务集合
	 * 
	 * @param userID
	 * @return
	 */
	List<ThreeTaskExternal> findTaskExternal(Integer userID);
	
	/**
	 * 根据外部任务ID 和自查ID 查询所有检查项
	 */
	ExternalSelfItems findTaskExternalByID(Integer taskID,Integer selfTaskID);

	
	Map<String, String> getDepartmentMapByStrDecollator(String str, String decollator) throws Exception;

	/**
	 * 查询问题清单接收人
	 * @param selfTaskID
	 * @param riskGrade
	 * @param userID
	 * @return
	 */
	List<ReceiIissueMan> findReceiIissueMan(Integer threeId, String riskGrade, Integer userID);
	

	
}
